package cn.zuzi.mzitu.utils;

import java.io.File;
import java.io.IOException;

import org.apache.commons.io.FileUtils;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

public class DemoGetPicNum {

	public static void main(String[] args) throws IOException {
		String file = FileUtils.readFileToString(FileUtils.getFile(new File(".").getAbsoluteFile(), "picNumStr.txt"), "UTF-8");
		Document parse = Jsoup.parse(file, "UTF-8");
		Elements elementsByTag = parse.getElementsByTag("a");
		Element element2 = elementsByTag.get(elementsByTag.size()-2);

		System.out.println(element2.text() + "<<<<<<<<<<<<<");
		for (Element element : elementsByTag) {
			System.out.println(element.toString());
		}

	}
}
